package com.haier.npt.security.i18n;

import com.haier.npt.exception.ExceptionResolvable;

/**
 * @Description:国际化异常编码 
 * @author: lixu
 * @date:   2018年7月13日 下午1:38:26   
 */
public enum SecurityExceptionCode  implements ExceptionResolvable {



    SUCCESS                                      (0,"security.success"),
    ILLEGAL_ARGUMENT                             (400,"security.illegal.argument"),

    SYS_APP_EXISTS                               (11001,"security.sys.app.exists"),
    SYS_APP_NOT_EXISTS                           (11002,"security.sys.app.not.exists"),
    SYS_APP_EXPIRE                               (11003,"security.sys.app.expire"),
    SYS_APP_ERROR                                (11004,"security.sys.app.error"),
    PERMISSION_EXISTS                            (11005,"security.sys.permission.exists"),
    PERMISSION_NOT_EXISTS                        (11006,"security.sys.permission.not.exists"),
    ROLE_EXSITS                                  (11007,"security.sys.app.role.exsits"),
    ROLE_NOT_EXISTS                              (11008,"security.sys.app.role.not.exists")


    ;

    Integer code;
    String message;

    SecurityExceptionCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return getMessage(message);
    }
}
